/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lucava.boatskeeper.client.event.boat;

import com.google.gwt.event.shared.GwtEvent;
import java.util.List;

/**
 *
 * @author glenn
 */
public class DeleteBoatsEvent extends GwtEvent<BoatHandler> {

    final private List<Integer> boatIds;
    public static Type<BoatHandler> TYPE = new Type<BoatHandler>();

    public DeleteBoatsEvent(List<Integer> boatIds) {
        this.boatIds = boatIds;
    }

    public List<Integer> getBoatIds() {
        return boatIds;
    }

    @Override
    public Type<BoatHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(BoatHandler handler) {
        handler.onDeleteBoats(this);
    }
}